
import { UserInfoType } from "@/api";
import {  UserType } from "../actions";

const initialState = {} as UserInfoType


// 函数 +初始化状态
// action 先写成any
const user = (state: UserInfoType= initialState, action: UserType) => {
  switch (action.type) {
    case 'user/info':
      return action.info
  
    default:
      return state
      
  }
}

export default user
